package com.hyh.feign.clients;


import com.hyh.feign.result.PageResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(value = "userservice")
public interface UserClient {
    // 根据id查询用户信息
    // 注意：这里的返回值类型是必须和所写的接口的返回值类型保持一致，否则取出的对象是空的
    @GetMapping("/api/user/getUserById/{id}")
    PageResult getUserById(@PathVariable("id") Integer id);
}
